<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增车辆')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-vehicle-add">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">车辆识别号代码：</label>
                    <div class="col-sm-8">
                        <input name="vinCode" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">品牌：</label>
                    <div class="col-sm-8">
                        <select name="brand" class="form-control" th:with="type=${@dict.getType('vehicle_brand_name_dic')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">整车型号：</label>
                    <div class="col-sm-8">
                        <input name="vehicleModel" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">生产序号：</label>
                    <div class="col-sm-8">
                        <input name="productionSerialNumber" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">乘员数：</label>
                    <div class="col-sm-8">
                        <input name="numberOfOccupants" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">乘员数_特殊：</label>
                    <div class="col-sm-8">
                        <input name="numberOfOccupantsSpecial" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">最大允许总质量 kg：</label>
                    <div class="col-sm-8">
                        <input name="maximumAllowableGrossMass" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">主驱动电机型号：</label>
                    <div class="col-sm-8">
                        <input name="mainDriveMotorModel" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">2号电机型号：</label>
                    <div class="col-sm-8">
                        <input name="motor2Model" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">3号电机型号：</label>
                    <div class="col-sm-8">
                        <input name="motor3Model" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">4号电机型号：</label>
                    <div class="col-sm-8">
                        <input name="motor4Model" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">动力电池工作电压 V：</label>
                    <div class="col-sm-8">
                        <input name="powerBatteryOperatingVoltage" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">主驱动电机额定功率 kW：</label>
                    <div class="col-sm-8">
                        <input name="mainDriveMotorRatedPower" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">2号电机额定功率：</label>
                    <div class="col-sm-8">
                        <input name="motor2RatedPower" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">3号电机额定功率：</label>
                    <div class="col-sm-8">
                        <input name="motor3RatedPower" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">4号电机额定功率：</label>
                    <div class="col-sm-8">
                        <input name="motor4RatedPower" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">动力电池容量 AH：</label>
                    <div class="col-sm-8">
                        <input name="powerBatteryCapacity" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">主驱动电机峰值功率 kW：</label>
                    <div class="col-sm-8">
                        <input name="mainDriveMotorPeakPower" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">2号电机峰值功率：</label>
                    <div class="col-sm-8">
                        <input name="motor2PeakPower" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">3号电机峰值功率：</label>
                    <div class="col-sm-8">
                        <input name="motor3PeakPower" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">4号电机峰值功率：</label>
                    <div class="col-sm-8">
                        <input name="motor4PeakPower" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">制造年月：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="manufacturingDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">制造国：</label>
                    <div class="col-sm-8">
                        <select name="countryOfManufacture" class="form-control" th:with="type=${@dict.getType('country_dic')}">
                            <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
                        </select>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">备注信息：</label>
                    <div class="col-sm-8">
                        <textarea name="remarks" class="form-control"></textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">车牌号：</label>
                    <div class="col-sm-8">
                        <input name="licensePlateNumber" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">责任人：</label>
                    <div class="col-sm-8">
                        <input name="responsiblePerson" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">责任人联系方式：</label>
                    <div class="col-sm-8">
                        <input name="responsiblePersonContact" class="form-control" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/vehicle"
        $("#form-vehicle-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/add", $('#form-vehicle-add').serialize());
            }
        }

        $("input[name='manufacturingDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>